from django import forms
from core.models.mistake import Mistake


class MistakeForm(forms.ModelForm):
    class Meta:
        model = Mistake
        fields = ['knowledge_point', 'title', 'question', 'answer']
        widgets = {
            'question':forms.Textarea(attrs={'class': 'ckeditor'}),
            'answer':forms.Textarea(attrs={'class': 'ckeditor'}),
            'knowledge_point': forms.HiddenInput(),
        }
        labels = {
            'title': '错题标题',
            'question': '问题描述',
            'answer': '解答过程',
        }


  